﻿using Common;
using IDal;
using Model.DbContext;
using Txy.IDal.Core;

namespace DalFactory
{
	public partial class DalSession:IDalSession
    {
        //public DalSession()
        //{
        //    LogHelper.WriteDebugLog(this.GetType(), "DalSession生产了");
        //}

        public ModelContainer CurrentDbContext { get; set; }
		public IBaseDalExtend BaseDalExtend { get; set; }
		public ModelContainer TimelyDbContext { get { return new ModelContainer(); }}

		public IUserInfoDal UserInfoDal{ get; set;}
		public IRoleDal RoleDal{ get; set;}
		public IPowerDal PowerDal{ get; set;}
		public IDepartmentDal DepartmentDal{ get; set;}
		public IDataDictionaryHeadDal DataDictionaryHeadDal{ get; set;}
		public IDataDictionaryItemDal DataDictionaryItemDal{ get; set;}
		public ILoginoutDal LoginoutDal{ get; set;}
		public ITreeDataHeadDal TreeDataHeadDal{ get; set;}
		public ITreeDataItemDal TreeDataItemDal{ get; set;}
		public ITestDal TestDal{ get; set;}
 
        public int SaveChanges() {
            return CurrentDbContext.SaveChanges();
        }
	}
}



